home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aaf.d64
/
chain-saw
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
104 lines
1 REM CHAIN-SAW (DISK LOG RCK3.0) (C)1986 BY R.C. KRULISH
10 PRINT"[158][147]";:POKE45,01:POKE46,51:POKE55,255:POKE56,127:CLR:GOTO40
20 GETA$:IFA$<>""THEN20
21 GETA$:IFA$=""THEN21
22 RETURN
30 I2=1
31 I1$=""
32 I1=38-POS(0):FORI3=0TOI1:PRINT" ";:NEXT:FORI3=1TOI1:PRINT"[157]";:NEXT
33 PRINT" [146][157][158]";
34 GOSUB20:I1=ASC(A$)
35 IFI1=13THENI1=VAL(I1$):PRINT" ":I2=0:RETURN
36 IFLEN(I1$)>0ANDI1=20THENPRINTA$;:I1$=LEFT$(I1$,LEN(I1$)-1):GOTO33
37 IFI2THENIFI1=47ORI1=44ORI1<43OR(I1>57ANDI1<>69)THEN34
38 IFI1=34OR(I1AND127)<32THEN34
39 PRINTA$;:I1$=I1$+A$:GOTO33
40 DIMB$(15):POKE53280,12:POKE53281,11
100 OPEN4,3:GOSUB1100:CLOSE4
110 PRINT" DISK LOG RCK 3.0"
120 PRINT" (C)1986 BY R.C. KRULISH"
130 GOSUB1000
140 PRINT""SPC(19)"[176]NORMAL"SPC(6)"= RET[146]"
150 PRINTSPC(8)"[213]TO SCREEN [219]HEADER ONLY = H[146]"
160 PRINT" OUTPUT[179]"SPC(10)"[173]FOR MONITOR = M[146]"
170 PRINTSPC(8)"[202]TO PRINTER[178]NORMAL SIZE = N[146]"
180 PRINTSPC(19)"[173]TINY PRINT = T[146]"
190 IFD=0THENOPEN15,8,15:SYS5400:D=1
200 GOSUB20:H=0:Z=3:P=0:IFA$="N"THENZ=4
210 IFA$="H"THENH=1:GOTO300
220 IFA$="M"THENRN=1
230 IFA$="T"THENZ=4:P=3
240 PRINT" TRACE ALL FILES? (RET[146]/N[146])"
250 :
260 GOSUB20:FT=3:IFA$="N"THENFT=0:GOTO280
270 IFA$<>CHR$(13)THEN260
280 IFZ=3ORD$<>""THEN300
290 PRINT" ENTER DATE/NOTE (OR RET[146])";:GOSUB31:D$=I1$:IFD$=""THEND$="*"
300 IFDE=0THENPRINT#15,"I0":GOSUB800:SYS5403:GOSUB1200
310 SP=(Z-3)*(24-4*P/3):OPEN4,Z:IFP=0THEN340
320 PRINT#4,CHR$(27)"S"CHR$(1);CHR$(27)"A"CHR$(6);
330 PRINT#4,CHR$(20)
340 PRINT"[147]":PRINT#4,SPC(SP);:GOSUB1110
350 PRINT#4,SPC(SP)N$" "D$
360 PRINT#4,SPC(SP)"ID:"I$"("FI$") DOS:"DO$"("S$") BLOCKS FREE:"BF:PRINT#4
370 IFH=1THEN420
380 PRINT" PLEASE WAIT. I'M WORKING![145][145][145]"
390 IFDE=0THENPRINT#15,"I0":SYS(5376+FT):GOSUB1300:DE=1:IFRN=1THEN620
400 IFDE<2THENSYS(5382+P):DE=2
410 SYS(5379+3*Z):IFZ=3THENGOSUB1020:GOSUB20
420 PRINT#4:CLOSE4
430 GOSUB1000:IFDE=0THENPRINT:GOTO480
440 PRINT" PRESENT DATA:TO[178]SCREEN"SPC(7)"= RET[146]"
450 PRINTSPC(18)"[171]PRINTER[178]NORM = N[146]"
460 PRINTSPC(7)"OR"SPC(9)"[221]"SPC(7)"[173]TINY = T[146]"
470 PRINTSPC(18)"[173]MONITOR VIEW = M[146]"
480 PRINT" DO NEW RUN:WITH[178]SAME OPTIONS = S[146]"
490 PRINTSPC(18)"[173]REDO OPTIONS = R[146]"
500 PRINTSPC(27)"EXIT = X[146]"
510 GOSUB20:IFDE=0THEN560
520 IFA$=CHR$(13)THENGOSUB750:P=0:Z=3:GOTO280
530 IFA$="N"THEN600
540 IFA$="T"THENP=3:GOTO610
550 IFA$="M"THENRN=2:GOTO620
560 IFA$="S"THENDE=0:GOTO300
570 IFA$="R"THENGOSUB750:DE=0:PRINT"[147]":GOTO100
580 IFA$="X"THEN750
590 GOTO510
600 GOSUB750:P=0
610 SYS(5394+P):Z=4:GOTO280
620 GOSUB1030:GOSUB20:IFA$="Y"THENSYS36275
700 ONRNGOTO710,720
710 RN=0:GOTO340
720 RN=0:PRINT"[147]":GOTO430
750 IFP=0THEN770
760 OPEN4,4:PRINT#4,CHR$(27)"@":CLOSE4
770 IFA$="X"THENCLOSE15:END
780 RETURN
800 INPUT#15,EN,EN$,ET,ES:IFEN=0THENRETURN
820 PRINT""EN;EN$;ET;ES:CLOSE15:END
830 B=PEEK(L):IFB=34THENB=39
840 IF(127ANDB)<32THENB=63
850 B$(N)=CHR$(B):RETURN
1000 PRINT" [159]INSERT SUBJECT DISK BEFORE SELECTING[158]":RETURN
1020 PRINT" (PRESS ANY KEY TO CONTINUE)":RETURN
1030 PRINT"[147] PROCEED ONLY IF MONITOR IS LOADED"
1032 PRINT" AND ADDRESSABLE AT $8DB3 (36275)"
1034 PRINT" (DATA STARTS AT $2000)"
1036 PRINT" USE 'GOTO 700' TO RE-ENTER PROGRAM"
1038 PRINT" PROCEED? (Y[146]/N[146])":RETURN
1100 PRINT"[147] ";:GOTO1120
1110 PRINT" ";
1120 PRINT#4,"************* CHAIN-SAW **************":PRINT"[146]":RETURN
1200 N=0:L=7938+N:GOSUB830:S$=B$(0)
1210 N$="":FORN=0TO15:L=8080+N:GOSUB830
1220 IFB$(N)=CHR$(160)THENB$(N)=""
1230 N$=N$+B$(N):NEXT
1240 FORN=0TO4:L=8098+N:GOSUB830:NEXT
1250 I$=B$(0)+B$(1):DO$=B$(3)+B$(4)
1260 FORN=0TO1:L=7918+N:GOSUB830:NEXT:FI$=B$(0)+B$(1)
1270 BF=PEEK(7916)+256*PEEK(7917):RETURN
1300 S=54272:FORN=0TO23:POKES+N,0:NEXT:POKES+24,15:POKES+1,130:POKES+5,9
1310 POKES+15,30:POKES+4,21:FORT=1TO1000:NEXT:POKES+4,20:FORT=1TO10:NEXT
1320 POKES+24,0:RETURN
1400 END